package com.bd.scm.module.rule.controller;


import com.alibaba.fastjson.JSONArray;
import com.bd.scm.domain.dto.user.UserDto;
import com.bd.scm.module.common.BaseController;
import com.bd.scm.module.rule.service.IMjRuleRealService;
import com.bd.scm.module.rule.service.impl.MjRuleRealServiceImpl;
import com.bd.scm.module.utils.ResultUtil;
import com.bd.utils.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *  门禁规则前端控制器
 *  User: _Cps
 *  Date: 2019.08.28 16:44
 */
@RestController
@RequestMapping("/api/rule/door")
public class MjRuleRealController extends BaseController {

    @Autowired
    private IMjRuleRealService iMjRuleRealService;

    /**
     * 获取门禁规则
     * @return
     */
    @PostMapping("/getDoorRule")
    public Result getDoorRule(){
        System.out.println("<<<<<"+ JSONArray.toJSONString(iMjRuleRealService.getDoorRule()));
        return ResultUtil.ok(iMjRuleRealService.getDoorRule());
    }

}
